<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <script type="text/javascript">
    //判断两次输入的新密码是否一致
    $(function(){
    	$("#newpsw2").blur(function(){
    		var  newpsw1 = $("#newpsw1").val();
    		var  newpsw2 = $(this).val();
    		if(newpsw1==newpsw2){
    			 $("span").text("");
    		     $("form").attr("onsubmit","return true");
    		}else{
    			 $("span").text("请确保2次密码一致");
    			 $("form").attr("onsubmit","return false");
    		}
    	});
    });
</script>
    <h2>${Msg}</h2>
    <form  action="updatePsw" method="post" onsubmit="return false">
  <div class="form-group">
    <label for="oldpsw">用户名</label>
    <input type="password" class="form-control" id="oldpsw" name="oldpsw" placeholder="请输入用户名"/>
  </div>
  <div class="form-group">
    <label for="newpsw1">输入密码</label>
    <input type="password" class="form-control" id="newpsw1" placeholder="输入密码"/>
  </div>
  <div class="form-group">
    <label for="newpsw2">确认密码</label>
    <input type="password" class="form-control" id="newpsw2" name="newpsw2" placeholder="确认密码"/>
    <span></span>
  </div>
  <button type="submit" class="btn btn-default">提交</button>
</form></html>